package com.hyper_yang._03_designpatterns.principles.demo6;

/**
 * projectName: com.hyper_yang._03_designpatterns.principles.demo6
 *
 * @author: sakiko
 * time: 2025/9/26 23:48
 * description: 测试 迪米特法则 【无需直接交互的两个类，如果需要交互，使用中间者】
 */
public class Test {
    public static void main(String[] args) {
        AgentPerson agent = new AgentPerson();
        Star star = new Star("sakiko");
        Fans fan = new Fans("yy");
        Company company = new Company("ave mujica");
        agent.setStar(star);
        agent.setFans(fan);
        agent.setCompany(company);

        // 和粉丝见面
        agent.meeting();
        // 和公司洽谈
        agent.business();
    }
}
